import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        String c = scanner.next();
        int b = scanner.nextInt();
        switch (c) {
            case "&":
                System.out.println(a + " & " + b + " = " + (a & b));
                break;
            case "|":
                System.out.println(a + " | " + b + " = " + (a | b));
                break;
            case "^":
                System.out.println(a + " ^ " + b + " = " + (a ^ b));
                break;
            default:
                System.out.println("ERROR");
                break;
        }
    }
}